package cn.dansj.handler.interfaces;

import cn.dansj.annotation.MarkAsApi;
import cn.dansj.bean.CurrentThreadLocalUserInfo;
import cn.dansj.enums.GlobalEnv;
import cn.dansj.handler.InterfaceHandler;

import java.util.Map;

@MarkAsApi
public class EdgeLogout extends InterfaceHandler {
    @Override
    public Object execute(Map<String, Object> paramsMap) {
        String token = CurrentThreadLocalUserInfo.getCurrentThreadLocalUserInfo().getCacheToken().getUuid();
        return redisUtils.delete(GlobalEnv.CacheTokenPrefix + token);
    }
}
